<?php  session_start();

/**
* @package		Parents@School.
* @copyright	Copyright (C) 2008 Kristof Beckers. All rights reserved.
* @Version		1.0
* @license		GNU/GPL, see LICENSE.php
**/
?><head>
<link rel="stylesheet" href="../../css/template_css.css" type="text/css"/> 
</head>
<?php  
include ("../../include/config.php");
include ("../../include/header.php");
include ("../../include/db.php");


if(isset($_SESSION['myusername'])){
	if ($_SESSION['admin'] == "$adminid") {
?>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title></title>
</head>

<body>
<div align="center"><img src="<?php echo "../$logo" ; ?>" /><br><br>
<p><a href="../index.php"><img src="<?php echo "../$home" ; ?>" border="0"></a></p><br><br>
<form id='form1' name='form1' method='post' action='parameter_process.php'>
  <table  border='0' class='moduletable-latest'>
    <tr>
      <td >Geef het start uur op: </td>
      <td><select name='startuur' id='startuur'>
        <option value='8:00:00'>8:00:00</option>
		<option value='8:30:00'>8:30:00</option>
        <option value='9:00:00'>9:00:00</option>
		<option value='9:30:00'>9:30:00</option>
        <option value='10:00:00'>10:00:00</option>
		<option value='10:30:00'>10:30:00</option>
        <option value='11:00:00'>11:00:00</option>
		<option value='11:30:00'>11:30:00</option>
        <option value='12:00:00'>12:00:00</option>
		<option value='12:30:00'>12:30:00</option>
        <option value='13:00:00'>13:00:00</option>
		<option value='13:30:00'>13:30:00</option>
        <option value='14:00:00'>14:00:00</option>
		<option value='14:30:00'>14:30:00</option>
        <option value='15:00:00'>15:00:00</option>
		<option value='15:30:00'>15:30:00</option>
        <option value='16:00:00'>16:00:00</option>
		<option value='16:30:00'>16:30:00</option>
        <option value='17:00:00'>17:00:00</option>
		<option value='17:30:00'>17:30:00</option>
        <option value='18:00:00' selected='selected'>18:00:00</option>
		<option value='18:30:00'>18:30:00</option>
        <option value='19:00:00'>19:00:00</option>
		<option value='19:30:00'>19:30:00</option>
        <option value='20:00:00'>20:00:00</option>
		<option value='20:30:00'>20:30:00</option>
        <option value='21:00:00'>21:00:00</option>
		<option value='21:30:00'>21:30:00</option>
        <option value='22:00:00'>22:00:00</option>
		<option value='22:30:00'>22:30:00</option>
        <option value='23:00:00'>23:00:00</option>
		<option value='23:30:00'>23:30:00</option>
      </select> 
      </td>
    </tr>
    <tr>
      <td>Geef het eind uur op:</td>
      <td ><select name='einduur' id='einduur'>
        <option value='8:00:00'>8:00:00</option>
		<option value='8:30:00'>8:30:00</option>
        <option value='9:00:00'>9:00:00</option>
		<option value='9:30:00'>9:30:00</option>
        <option value='10:00:00'>10:00:00</option>
		<option value='10:30:00'>10:30:00</option>
        <option value='11:00:00'>11:00:00</option>
		<option value='11:30:00'>11:30:00</option>
        <option value='12:00:00'>12:00:00</option>
		<option value='12:30:00'>12:30:00</option>
        <option value='13:00:00'>13:00:00</option>
		<option value='13:30:00'>13:30:00</option>
        <option value='14:00:00'>14:00:00</option>
		<option value='14:30:00'>14:30:00</option>
        <option value='15:00:00'>15:00:00</option>
		<option value='15:30:00'>15:30:00</option>
        <option value='16:00:00'>16:00:00</option>
		<option value='16:30:00'>16:30:00</option>
        <option value='17:00:00'>17:00:00</option>
		<option value='17:30:00'>17:30:00</option>
        <option value='18:00:00'>18:00:00</option>
		<option value='18:30:00'>18:30:00</option>
        <option value='19:00:00'>19:00:00</option>
		<option value='19:30:00'>19:30:00</option>
        <option value='20:00:00'>20:00:00</option>
		<option value='20:30:00'>20:30:00</option>
        <option value='21:00:00' selected='selected'>21:00:00</option>
		<option value='21:30:00'>21:30:00</option>
        <option value='22:00:00'>22:00:00</option>
		<option value='22:30:00'>22:30:00</option>
        <option value='23:00:00'>23:00:00</option>
		<option value='23:30:00'>23:30:00</option>
      </select>
      </td>
    </tr>
    <tr>
      <td>Duur per sessie: (in minuten)</td>
      <td><select name='sessieduur' id='sessieduur'>
        <option value='5' selected='selected'>5</option>
        <option value='10'>10</option>
        <option value='15'>15</option>
        <option value='20'>20</option>
        <option value='25'>25</option>
        <option value='30'>30</option>
      </select>        </td>
    </tr>
    <tr>
      <td>Klasdirectie of iedereen:</td>
      <td><select name='klasdirectie' id='klasdirectie'>
        <option value='klasdirectie'>klasdirectie</option>
        <option value='iedereen'>iedereen</option>
      </select>      </td>
    </tr>
    <tr>
      <td>Datum:</td>
      <td><select name='datum' id='datum'> 
       <?php 
	   $sql="SELECT * FROM $tbdate";
$result=mysql_query($sql);

while ($row = mysql_fetch_array($result)) {
	$date = $row['date'];
	?>
	    <option value="<?php echo "$date" ; ?>"><?php echo "$date" ; ?></option><?php } ?>
      </select>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><input type='submit' name='Verstuur' id='Verstuur' value='Verstuur' /></td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>

<hr>

<?php

$sqlparam = "SELECT * FROM $tbparam";
$resparam= mysql_query($sqlparam);
?>
<form id='form2' name='form2' method='post' action='parameter_delete.php'>
  <table  border='0' class='moduletable-latest1'>
    <tr>
      <td >Beginuur</td>
      <td >Einduur</td>
      <td >Sessieduur</td>
      <td >Klasdirectie</td>
      <td >Datum</td>
	  <td >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>
</table>
<?php
while ($rowparam= mysql_fetch_array($resparam)){
	$iddelete = $rowparam['ID'];
	$begin = $rowparam['Beginuur'];
	$eind = $rowparam['Einduur'];
	$sessie = $rowparam['Sessieduur'];
	$kd = $rowparam['Klasdirectie'];
	$datum = $rowparam['datum'];
?>
<table  border='0' class='moduletable-latest1'>
    <tr>
      <td ><?php echo "$begin" ; ?></td>
      <td ><?php echo "$eind" ; ?></td>
      <td ><?php echo "$sessie (min.)" ; ?></td>
      <td ><?php echo "$kd" ; ?></td>
      <td ><?php echo "$datum" ; ?></td>
	  <td ><input name="delete" type="radio" value="<?php echo "$iddelete" ;?>"></td>
	  </tr>
</table>
  <p>&nbsp;</p>
  <p><?php 
}
?>
    <input name="Verwijder" type="submit" id="Verwijder" value="Verwijder">
  </p>
</form>



</body>
</html>
<?php 
}}
else {
header("location:../index.php");
}; 
?> 